package com.knight.annotation;

import org.springframework.context.annotation.*;

@Configuration
public class PersonConfiguration {

    @Bean(value = "person")
    public Person person(){
        System.out.println("create person");
        Person person = new Person();
        person.setAge(12);
        person.setName("lilei");
        return person;
    }
}
